#ifndef CRC_CCITT_HPP
#define CRC_CCITT_HPP

#include <cstddef>  // 替换 cstdint

class CRC_CCITT {
public:
    static unsigned short calculate(unsigned short crc, const unsigned char *buffer, std::size_t len);

private:
    static const unsigned short crc_ccitt_table[256];
    static unsigned short crc_ccitt_byte(unsigned short crc, unsigned char c);
};

#endif // CRC_CCITT_HPP

